
import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
  Image,
  TouchableOpacity,
  ScrollView,
} from 'react-native';
import CommonCell from './CommonCell';
export default class More extends Component {
  render() {
    return (
      <View style={styles.container}>
        {this.renderNavBar()}
        <ScrollView>
          <View style={{marginTop:20,}}>
            <CommonCell title="扫一扫"/>
          </View>
          <View style={{marginTop:15,}}>
            <CommonCell title="省流量模式" isSwitch={true} />
            <CommonCell title="消息提醒"/>
            <CommonCell title="邀请好友使用小码哥电商"/>
            <CommonCell title="清空缓存" rightTitle="1.99M"/>
          </View>
          <View style={{marginTop:15,}}>
            <CommonCell title="意见反馈"/>
            <CommonCell title="问卷调查"/>
            <CommonCell title="支付帮助"/>
            <CommonCell title="网络诊断"/>
            <CommonCell title="关于码团"/>
            <CommonCell title="我要应聘"/>
          </View>
          <View style={{marginTop:15,}}>
            <CommonCell title="精品应用"/>
          </View>
        </ScrollView>
        
        
      </View>
    );
  }
  renderNavBar(){
    return(
      <View style={styles.navOutViewStyle}>
        <Text style={{color:'white',fontSize:16,fontWeight:'bold'}}>更多</Text>
        <TouchableOpacity onPress={()=>{alert('更多')}} style={styles.rightViewStyle}>
          <Image source={{uri:'icon_setting'}} style={styles.nvaImgStyle}/>
        </TouchableOpacity>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#e8e8e8',
  },
  navOutViewStyle:{
    height:Platform.OS === 'ios'?64:44,
    backgroundColor:'rgba(255,96,0,1)',
    flexDirection:'row',
    justifyContent:'center',
    alignItems:'center',
  },
  rightViewStyle:{
    //borderWidth:StyleSheet.hairlineWidth,
    //borderColor:'white',
    position:'absolute',
    right:10,
  },
  nvaImgStyle:{
    width:Platform.OS === 'ios'?28:24,
    height:Platform.OS === 'ios'?28:24,
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
});
